import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

// 左右线性渐变色
const gridient = LinearGradient(colors: [
  Color(0xffF85238),
  Color(0xFFE2112C),
]);

class Home extends StatefulWidget {
  @override
  _Home createState() => _Home();
}

class _Home extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        flexibleSpace: Container(
          decoration: BoxDecoration(
            gradient: gridient,
          ),
        ),
      ),
      body: WebView(
        debuggingEnabled: true,
        initialUrl: 'https://m.baidu.com/',
      ),
    );
  }
}
